<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="../plugins/bootstrap/bootstrap-4.4.1-dist/css/bootstrap.min.css">
  <link rel="stylesheet" href="css/nav.css">
  <link rel="icon" href="imgs/icon.ico" type="images/x-ico" />
  <style type="text/css">
    html {
        height: 100%
    }

    body {
        height: 100%;
        margin: 0px;
        padding: 0px
    }

    #container {
        width: 100%;
        height: 450px;
        border: #ccc solid 1px;
    }
</style>
<script type="text/javascript"
    src="http://api.map.baidu.com/api?v=3.0&ak=nGGIg5o99yFrRmVRM5sgX9LUi39ObA3Y"></script>
</head>

<body>
  <nav class="navbar navbar-expand-lg navbar-light bg-light " id="nav">

    <div class="collapse navbar-collapse col-md-10 offset-md-1 animate__animated  animate__zoomIn"
      id="navbarSupportedContent">
      <a id="logo-img" class="navbar-brand" href="../view/index.html">
        <img alt="Brand" src="../common/imgs/logo_small.png">
      </a>
      <ul class="navbar-nav mr-auto">
        <li class="nav-item">
          <a id="select-city" class="nav-link" href="#"><svg id="city-icon" class="bi bi-building" width="1em"
              height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
              <path fill-rule="evenodd"
                d="M15.285.089A.5.5 0 0 1 15.5.5v15a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5V14h-1v1.5a.5.5 0 0 1-.5.5H1a.5.5 0 0 1-.5-.5v-6a.5.5 0 0 1 .418-.493l5.582-.93V3.5a.5.5 0 0 1 .324-.468l8-3a.5.5 0 0 1 .46.057zM7.5 3.846V8.5a.5.5 0 0 1-.418.493l-5.582.93V15h8v-1.5a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 .5.5V15h2V1.222l-7 2.624z" />
              <path fill-rule="evenodd" d="M6.5 15.5v-7h1v7h-1z" />
              <path
                d="M2.5 11h1v1h-1v-1zm2 0h1v1h-1v-1zm-2 2h1v1h-1v-1zm2 0h1v1h-1v-1zm6-10h1v1h-1V3zm2 0h1v1h-1V3zm-4 2h1v1h-1V5zm2 0h1v1h-1V5zm2 0h1v1h-1V5zm-2 2h1v1h-1V7zm2 0h1v1h-1V7zm-4 0h1v1h-1V7zm0 2h1v1h-1V9zm2 0h1v1h-1V9zm2 0h1v1h-1V9zm-4 2h1v1h-1v-1zm2 0h1v1h-1v-1zm2 0h1v1h-1v-1z" />
            </svg><span id="cityname">选择城市<span></a>
        </li>
      </ul>
      <ul class="navbar-nav mr-5 ">
        <li class="nav-item">
          <a class="nav-link" href="../view/search.html">租房</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="../view/issuehouse-one.html">发布房源</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="../view/roomate.html">寻找室友</a>
        </li>
        <li class="nav-item">
          <a class="nav-link" href="#">房价走势</a>
        </li>
        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown"
            aria-haspopup="true" aria-expanded="false">
            指南
          </a>
          <div class="dropdown-menu" aria-labelledby="navbarDropdown">
            <a class="dropdown-item" href="Agreement.html">用户协议</a>
            <a class="dropdown-item" href="Potplayer.html">隐私政策</a>
            <a class="dropdown-item" href="Commitment.html">服务承诺</a>
            <div class="dropdown-divider"></div>
            <a class="dropdown-item" href="#">关于我们</a>
          </div>
        </li>
      </ul>
      <a href="login.html" id="login-button" class="btn btn-outline-success active animate__animated animate__pulse"
        role="button" aria-pressed="true">登录</a>
      <a href="register.html" id="register-button"
        class="btn btn-outline-success active animate__animated animate__pulse" role="button" aria-pressed="true">注册</a>
    </div>
  </nav>
  <script src="../plugins/jquery/jquery.min.js"></script>
  <script src="../plugins/bootstrap/bootstrap-4.4.1-dist/js/bootstrap.min.js"></script>
  <script>
    window.onload=function locationcity() {
      function myFun(result) {
        var cityName = result.name;
        var outer=document.getElementById("cityname");
        outer.innerText=cityName;
      }
      var myCity = new BMap.LocalCity();
      myCity.get(myFun);
    }
  </script>
</body>

</html>